<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>libwebsockets: lws_email Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="libwebsockets.org-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libwebsockets
   </div>
   <div id="projectbrief">Lightweight C library for HTML5 websockets</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('structlws__email.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">lws_email Struct Reference<div class="ingroups"><a class="el" href="group__smtp.html">Smtp</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="libwebsockets_8h_source.html">libwebsockets.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:add1341456045382c183f4c763bdea6bc"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#add1341456045382c183f4c763bdea6bc">data</a></td></tr>
<tr class="separator:add1341456045382c183f4c763bdea6bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5fbf121195a8e67509c78a42cfbe168"><td class="memItemLeft" align="right" valign="top">uv_loop_t *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#ab5fbf121195a8e67509c78a42cfbe168">loop</a></td></tr>
<tr class="separator:ab5fbf121195a8e67509c78a42cfbe168"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a472ae23fc9fca6599e5c512bc21458d2"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a472ae23fc9fca6599e5c512bc21458d2">email_smtp_ip</a> [32]</td></tr>
<tr class="separator:a472ae23fc9fca6599e5c512bc21458d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939e5d7ee0339a16de73bde71ab4d4d9"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a939e5d7ee0339a16de73bde71ab4d4d9">email_helo</a> [32]</td></tr>
<tr class="separator:a939e5d7ee0339a16de73bde71ab4d4d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7f0ae934347d81071f63a963301f9e2"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#af7f0ae934347d81071f63a963301f9e2">email_from</a> [100]</td></tr>
<tr class="separator:af7f0ae934347d81071f63a963301f9e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6453a8b92b3de6d2c2101af3edce685e"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a6453a8b92b3de6d2c2101af3edce685e">email_to</a> [100]</td></tr>
<tr class="separator:a6453a8b92b3de6d2c2101af3edce685e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bbc1964889c984b3da723c86a210e05"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a7bbc1964889c984b3da723c86a210e05">max_content_size</a></td></tr>
<tr class="separator:a7bbc1964889c984b3da723c86a210e05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8dc60353ee246d84dd59ec0591e9719"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#ad8dc60353ee246d84dd59ec0591e9719">on_next</a> )(struct <a class="el" href="structlws__email.html">lws_email</a> *email)</td></tr>
<tr class="separator:ad8dc60353ee246d84dd59ec0591e9719"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ef6263d58eb40cca417c8697b227d8"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a39ef6263d58eb40cca417c8697b227d8">on_sent</a> )(struct <a class="el" href="structlws__email.html">lws_email</a> *email)</td></tr>
<tr class="separator:a39ef6263d58eb40cca417c8697b227d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2aff78c8e04db243052aa91b4d87e987"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a2aff78c8e04db243052aa91b4d87e987">on_get_body</a> )(struct <a class="el" href="structlws__email.html">lws_email</a> *email, char *buf, int len)</td></tr>
<tr class="separator:a2aff78c8e04db243052aa91b4d87e987"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77723e2f2b940b1c879ef5e1cd88c2be"><td class="memItemLeft" align="right" valign="top">uv_timer_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a77723e2f2b940b1c879ef5e1cd88c2be">timeout_email</a></td></tr>
<tr class="separator:a77723e2f2b940b1c879ef5e1cd88c2be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6115d3cbef2e8bac62cc00895bf5fd3"><td class="memItemLeft" align="right" valign="top">enum <a class="el" href="group__smtp.html#ga116be79bf44f9dc2a97f46e051fe4dc0">lwsgs_smtp_states</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#ac6115d3cbef2e8bac62cc00895bf5fd3">estate</a></td></tr>
<tr class="separator:ac6115d3cbef2e8bac62cc00895bf5fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5f53d4c5a1e34b0dcaa8787e2eabb1b3"><td class="memItemLeft" align="right" valign="top">uv_connect_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a5f53d4c5a1e34b0dcaa8787e2eabb1b3">email_connect_req</a></td></tr>
<tr class="separator:a5f53d4c5a1e34b0dcaa8787e2eabb1b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01f31934166dc6d01e8a375012f8ad1e"><td class="memItemLeft" align="right" valign="top">uv_tcp_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a01f31934166dc6d01e8a375012f8ad1e">email_client</a></td></tr>
<tr class="separator:a01f31934166dc6d01e8a375012f8ad1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9747ca85597788c2d118d287df47b7c1"><td class="memItemLeft" align="right" valign="top">time_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a9747ca85597788c2d118d287df47b7c1">email_connect_started</a></td></tr>
<tr class="separator:a9747ca85597788c2d118d287df47b7c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f34ec0643a817be67ef4276aeb7fb82"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a8f34ec0643a817be67ef4276aeb7fb82">email_buf</a> [256]</td></tr>
<tr class="separator:a8f34ec0643a817be67ef4276aeb7fb82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fff03c5a5d369a2aa3cab0c897b1bed"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlws__email.html#a6fff03c5a5d369a2aa3cab0c897b1bed">content</a></td></tr>
<tr class="separator:a6fff03c5a5d369a2aa3cab0c897b1bed"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>struct <a class="el" href="structlws__email.html">lws_email</a> - abstract context for performing SMTP operations </p>
</div><h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a6fff03c5a5d369a2aa3cab0c897b1bed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* lws_email::content</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="add1341456045382c183f4c763bdea6bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* lws_email::data</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>opaque pointer set by user code and available to the callbacks </p>

</div>
</div>
<a class="anchor" id="a8f34ec0643a817be67ef4276aeb7fb82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char lws_email::email_buf[256]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="a01f31934166dc6d01e8a375012f8ad1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_tcp_t lws_email::email_client</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="a5f53d4c5a1e34b0dcaa8787e2eabb1b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_connect_t lws_email::email_connect_req</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="a9747ca85597788c2d118d287df47b7c1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">time_t lws_email::email_connect_started</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="af7f0ae934347d81071f63a963301f9e2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char lws_email::email_from[100]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fill before init or on_next </p>

</div>
</div>
<a class="anchor" id="a939e5d7ee0339a16de73bde71ab4d4d9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char lws_email::email_helo[32]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fill before init, eg, "myserver.com" </p>

</div>
</div>
<a class="anchor" id="a472ae23fc9fca6599e5c512bc21458d2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char lws_email::email_smtp_ip[32]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fill before init, eg, "127.0.0.1" </p>

</div>
</div>
<a class="anchor" id="a6453a8b92b3de6d2c2101af3edce685e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char lws_email::email_to[100]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Fill before init or on_next </p>

</div>
</div>
<a class="anchor" id="ac6115d3cbef2e8bac62cc00895bf5fd3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__smtp.html#ga116be79bf44f9dc2a97f46e051fe4dc0">lwsgs_smtp_states</a> lws_email::estate</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<a class="anchor" id="ab5fbf121195a8e67509c78a42cfbe168"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_loop_t* lws_email::loop</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>the libuv loop we will work on </p>

</div>
</div>
<a class="anchor" id="a7bbc1964889c984b3da723c86a210e05"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int lws_email::max_content_size</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>largest possible email body size </p>

</div>
</div>
<a class="anchor" id="a2aff78c8e04db243052aa91b4d87e987"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* lws_email::on_get_body) (struct <a class="el" href="structlws__email.html">lws_email</a> *email, char *buf, int len)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>(Fill in before calling lws_email_init) called when the body part of the queued email is about to be sent to the SMTP server. </p>

</div>
</div>
<a class="anchor" id="ad8dc60353ee246d84dd59ec0591e9719"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* lws_email::on_next) (struct <a class="el" href="structlws__email.html">lws_email</a> *email)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>(Fill in before calling lws_email_init) called when idle, 0 = another email to send, nonzero is idle. If you return 0, all of the email_* char arrays must be set to something useful. </p>

</div>
</div>
<a class="anchor" id="a39ef6263d58eb40cca417c8697b227d8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int(* lws_email::on_sent) (struct <a class="el" href="structlws__email.html">lws_email</a> *email)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>(Fill in before calling lws_email_init) called when transfer of the email to the SMTP server was successful, your callback would remove the current email from its queue </p>

</div>
</div>
<a class="anchor" id="a77723e2f2b940b1c879ef5e1cd88c2be"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uv_timer_t lws_email::timeout_email</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>private </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>lib/<a class="el" href="libwebsockets_8h_source.html">libwebsockets.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="structlws__email.html">lws_email</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
